/**
 * 内容参考veevalidate官方示例：
 * https://codesandbox.io/s/veevalidate-30-vuei18n-integration-9vs4l?from-embed=&file=/src/vee-validate.js
 */

import Vue from 'vue'
import VueI18n from 'vue-i18n'
import zh from 'vee-validate/dist/locale/zh_CN.json'
Vue.use(VueI18n)

const i18n = new VueI18n({
  locale: 'zh_CN',
  messages: {
    zh_CN: {
      fields: {
        password: '密码',
        name: '昵称',
        username: '账号',
        code: '验证码',
        nickname: '昵称',
        repassword: '确认密码'
      },
      validation: {
        ...zh.messages,
        required: '请输入{_field_}'
      }
    }
  }
})

export { i18n }
